#ifndef DEVILSPRITE_H_
#define DEVILSPRITE_H_
#include "cocos2d.h"
#include "BelkaSprite.h"
using namespace cocos2d;
class DevilSprite: public::CCSprite {
private:
	float level;
	bool alive;
	bool won;
public:
	static DevilSprite* utworz();
	virtual bool init();
	CREATE_FUNC(DevilSprite);
	CCTexture2D *startTexture;
	CCRepeatForever *devilRpeatAnimation;
	bool currentlyJumping;
	void jumpEnded();
	void moveCharacter(bool jump,CCPoint velocity, float deltaTime, bool onBar);
	void setLevel(float y);
	void setLevelWidth(float x);
	void setMaxLeftRight(float l,float r);
	float levelWidht;
	float maxLeft;
	float maxRight;
	void collisionWithBar(BelkaSprite* bar);
	void fallEnded();
	CCAction *fallAction;
	CCAction *jumpAction;
	bool falling;
	void kill();
	bool isAlive();
	bool isWon();
};

#endif /* DEVILSPRITE_H_ */
